// 2013-7-28上午11:20:57  net.betou.trade.main.dao.IntermediateProvidersAndAdministratorsDao.java

package net.betou.trade.main.dao;

import net.betou.common.hibernate3.Updater;
import net.betou.common.page.Pagination;
import net.betou.trade.entity.main.AgentAndAdmins;

/**
 * 居间商、系统管理员、居间管理员三者共同的Dao
 * @author 叶装装
 * @deprecated
 */
public interface AgentAndAdminsDao{

	 // 获取单个
	public AgentAndAdmins findMyData( Integer dataId, Integer parentId, Boolean justAdmin );
	 
	 public AgentAndAdmins findById( Integer id );
	 
	 public AgentAndAdmins findByUsername( String username );
	 
	 public AgentAndAdmins findAgentOrAdmins( Boolean isSystem, Boolean justAdmin, Integer id );
	 
	 // 统计的
	 public int countByUsername( String username );
		
	 public int countByEmail( String email );
	
	 public int countByMobile( String mobile );
		
	 public int countByName( String name ); 
	 
	 // 增删改的
	 public AgentAndAdmins save( AgentAndAdmins bean );
	 
	 public AgentAndAdmins delete( AgentAndAdmins bean );
	 
	 public AgentAndAdmins deleteById( Integer id );
	 
	 public AgentAndAdmins updateByUpdater( Updater< AgentAndAdmins > updater );
	 
	 // 分页数据的
	 public Pagination getPage( Boolean system, Boolean justAdmin, Boolean agencyOrProxy, Integer selfId, String searchProperty, String searchValue, String orderProperty, String orderDirection, int pageNo, int pageSize, String filterStatus );
	 
	 public Pagination getPageByCriteria( String searchProperty, String searchValue, String orderProperty, String orderDirection, int pageNo, int pageSize, String sql );
	 
	 
	 
	 
}
